package com.study;

public class TeacherDemo {
    public static void main(String[] args) {
        // 使用无参构造函数创建对象
        TeacherClass teacher1 = new TeacherClass();
        teacher1.setName("张三");
        teacher1.setAge(18);
        System.out.println(teacher1.getName() + "," + teacher1.getAge());

        // 使用带参的构造函数
        TeacherClass teacher2 = new TeacherClass("李四", 24);
        System.out.println(teacher2.getName() + "," + teacher2.getAge());
    }
}
